package com.lwz.startdemo

import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider

/**
 * @Description: ViewModel 传参数
 * @Author: chad
 * @CreateDate: 2025/5/15 12:57
 * @Version: 1.0
 */
class MainViewModelFactory(private val initValue:Int) :ViewModelProvider.Factory{
    override fun <T : ViewModel> create(modelClass: Class<T>): T {
        return MainViewModel(initValue) as T
    }
}